package com.ruoyi.purchase.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.SysCity;
import lombok.Data;

/**
 * 
 * @TableName po_firm
 */
@TableName(value ="po_firm")
@Data
public class Firm implements Serializable {
    /**
     * 商品厂商id
     */
    @TableId(type = IdType.AUTO)
    private Integer firmId;

    /**
     * 厂商名称
     */
    @Excel(name = "厂商")
    private String firmName;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String firmChargeUser;

    /**
     * 联系电话
     */
    private String firmTel;

    /**
     * 所属区域城市
     */
    private Integer sysCityId;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间")
    private Date creatTime;

    /**
     * 商品状态(0:不可用；1:可用)
     */
    @Excel(name = "状态")
    private String status;

    /**
     * 创建人
     */
    private Integer sysCreateUserId;

    /**
     * 厂商描述
     */
    @Excel(name = "厂商描述")
    private String firmDesc;

    /**
     * 联系地址
     */
    @Excel(name = "地址")
    private String address;

    /**
     * 自定义创建人
     */
    @TableField(exist = false)
    private SysUser sysUser;

    /**
     * 自定义城市
     */
    @TableField(exist = false)
    private SysCity sysCity;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Firm firm = (Firm) o;
        return Objects.equals(firmId, firm.firmId) &&
                Objects.equals(firmName, firm.firmName) &&
                Objects.equals(firmChargeUser, firm.firmChargeUser) &&
                Objects.equals(firmTel, firm.firmTel) &&
                Objects.equals(sysCityId, firm.sysCityId) &&
                Objects.equals(creatTime, firm.creatTime) &&
                Objects.equals(status, firm.status) &&
                Objects.equals(sysCreateUserId, firm.sysCreateUserId) &&
                Objects.equals(firmDesc, firm.firmDesc) &&
                Objects.equals(address, firm.address);
    }

    @Override
    public int hashCode() {
        return Objects.hash(firmId, firmName, firmChargeUser, firmTel, sysCityId, creatTime, status, sysCreateUserId, firmDesc, address);
    }

    @Override
    public String toString() {
        return "Firm{" +
                "firmId=" + firmId +
                ", firmName='" + firmName + '\'' +
                ", firmChargeUser='" + firmChargeUser + '\'' +
                ", firmTel='" + firmTel + '\'' +
                ", sysCityId=" + sysCityId +
                ", creatTime=" + creatTime +
                ", status='" + status + '\'' +
                ", sysCreateUserId=" + sysCreateUserId +
                ", firmDesc='" + firmDesc + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}